﻿@*单页模板*@
@*验收清单模板*@
@{
    Layout = null;

    var siteService = new SiteService();
    var siteList = new SiteService().GetMany(s => s.Enable);
    var defaultDomain = SiteHelper.GetDefaultDomain();
    var currentSiteId = SiteContext.Current.SiteId;
    var currentSite = siteService.GetEntity(currentSiteId);
    var orderSites = siteList.Where(pi => pi.SiteCategoryId != null).OrderBy(pi => pi.SiteCategory?.Order).ToLookup(pi => pi.SiteCategory);
    var sites = siteList.Where(pi => pi.SiteCategoryId == null).ToLookup(pi => pi.SiteCategory);
    var siteCategoryCount = new SiteCategoryService().Count(pi => true);
}

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="renderer" content="webkit" />
    <title>验收清单 - @CurrentSite.Instance.SiteTitle</title>
    <script src="https://code.jquery.com/jquery.min.js"></script>
</head>
<style>
    /*预置全局样式*/
    a,abbr,acronym,address,applet,article,aside,audio,b,blockquote,big,body,center,canvas,caption,cite,code,command,datalist,dd,del,details,dfn,dl,div,dt,em,embed,fieldset,figcaption,figure,font,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,keygen,label,legend,li,meter,nav,object,ol,output,p,pre,progress,q,s,samp,section,small,span,source,strike,strong,sub,sup,menu,tbody,tfoot,thead,th,tr,td,video,tt,u,ul,var{background:transparent;font-size:100%;margin:0;padding:0;border:0;outline:0;}
    body{color:#000;font-size:14px;line-height:1.42857143;font-family:"Microsoft YaHei"}
    a{color:#000;text-decoration:none;}
    a:hover{color:red;}
    li,ol,ul{list-style:none;vertical-align:middle;}
    .check-list{width: 1200px; margin:40px auto;}
    .hd{ margin-bottom:20px;}
    h1.title{ font-size:30px; line-height:2em; text-align:center;}
    .notice { margin-top:20px; border:1px solid #eee; background-color:#f9f9f9; padding: 20px;}
    .bd{ margin-bottom:20px; overflow:hidden;}
    .fd{ clear:both; border-top:1px solid #ddd; padding:20px 0; text-align:center;}
    .site-list{line-height: 2em; overflow:hidden;}
    .site-list h3 {position: relative;font-size: 22px;width: 100%;overflow: hidden;clear: both;margin:10px 0;}
    .site-list h3 span {position: relative;z-index: 2; font-weight:normal; padding-right: 15px;background-color: #fff;}
    .site-list h3 i {height: 0;line-height: 0;font-size: 0;border-bottom: 1px dotted #ddd;top: 50%;left: auto;right: 0;width: 100%;position: absolute;}
    .site-list ul {overflow: hidden;}
    .site-list li {float: left;width: 19.99%; height:2em; overflow:hidden;}
    .site-list li a { position: relative; padding-left: 5px; float:left;}
    .site-list li a.title{ padding-left:10px; max-width: 70%; white-space: nowrap; text-overflow: ellipsis; overflow:hidden;}
    .site-list li a.title:before{content:""; position: absolute; top:50%; left:0; margin-top:-2px; width:4px; height:4px; border-radius:50%; background-color:#000;}
    .site-list li a.active{ color:#999;}
    .site-list li a.active:before{ background-color:#999;}
</style>
<body>
    <div class="check-list">
        <div class="hd">
            <h1 class="title">
                @CurrentSite.Instance.SiteTitle<script>var lastModified = document.lastModified;var lastDate = new Date(lastModified);var gy = lastDate.getFullYear();var gm = lastDate.getMonth()+1;var gd = lastDate.getDate();document.write("站群汇总 - "+gy+"年"+gm+"月"+gd+"日")</script>
            </h1>
            <div class="notice"><b>重要说明：</b>以下内容是网站最终实施内容，与合同上的需求分析文档栏目及要求是一一对应的，实施过程中有需求变动，请查看变更文档，若未定制相关功能模板，则需删除模板方案中的相关模板页面。
            </div>
        </div>
        <div class="bd">
            <div class="site-list">
                @if (siteList.Any(pi => pi.SiteCategoryId != null) && siteCategoryCount > 1)
                {
                    foreach (var orderSite in orderSites)
                    {
                        <h3><span>@orderSite.Key.SiteCategoryName</span><i></i></h3>
                        <ul>
                            @foreach (var item in orderSite)
                            {
                                <li><a class="title" href="@Power.Url.SiteUrl(item.Subdomain)" target="_blank" title="@item.SiteTitle">@item.SiteName</a><a class="btn-node-list" href="@Power.Url.NodeUrl("jdlb")?SiteId=@item.SiteId&SiteName=@item.SiteName" target="_blank">[清单]</a></li>
                            }
                        </ul>
                    }
                    foreach (var site in sites)
                    {
                        <h3><span>未指定</span><i></i></h3>
                        <ul>
                           @foreach (var item in site)
                            {
                                <li><a class="title" href="@Power.Url.SiteUrl(item.Subdomain)" target="_blank" title="@item.SiteTitle">@item.SiteName</a><a class="btn-node-list" href="@Power.Url.NodeUrl("jdlb")?SiteId=@item.SiteId&SiteName=@item.SiteName" target="_blank">[清单]</a></li>
                            }
                        </ul>
                    }
                }
                else{
                    <ul>
                        @foreach (var item in siteList)
                        {
                            <li><a class="title" href="@Power.Url.SiteUrl(item.Subdomain)" target="_blank" title="@item.SiteTitle">@item.SiteName</a><a class="btn-node-list" href="@Power.Url.NodeUrl("jdlb")?SiteId=@item.SiteId&SiteName=@item.SiteName" target="_blank">[清单]</a></li>
                        }
                    </ul>
                }
            </div>
        </div>
        <div class="fd">
            DTOP V2.1 &copy; 2003-- <script>var myDate = new Date();var str = myDate.getFullYear();document.write(str)</script><a target="_blank" href="http://www.miibeian.gov.cn">粤ICP备05004015号</a><br>Powered By [ The Design Team of <a target="_blank" href="http://www.powereasy.net">PowerEasy</a> ]
        </div>
    </div>
</body>
</html>

<script type="text/javascript">
   $(".site-list h3").each (function ()
   {
      $(this).find("span").append(" ("+ $(this).next("ul").find("li").length+ ")");//站点数量统计
   })
   $(".site-list li a").click(function(){
        $(this).addClass("active");//鼠标触发背景
    });
</script>